#ifndef GAME_H
#define GAME_H

#include <iostream>
#include <vector>

#include "movables.h"
#include "map.h"
#include "global_variables.h"

using namespace std;

enum Rules{CAN_MOVE, CANT_MOVE, DEATH_TO_DIGDUG, DEATH_TO_MONSTER, DEATH_TO_PROJECTILE, CAN_OVERLAP};
enum Move_result{HAS_MOVED, CANNOT_MOVE, OBJECT_DEAD, GAME_OVER};

class Game
{
public:

	Game ();
	bool update(Action instruction);
	
	Movables get_movable (Movable_type type, int vector_count);
	Map get_map();

private:
	
	Map _map;
	Movables _digdug;
	vector< Movables > _monsters;
	vector< Movables > _projectiles;

	Move_result move(Movables& movable, Direction direction);

	void generate_objects();	
	void generate_map();
	
	
	Rules get_rule(Movable_type object_type, Movable_type map_location_type);

	 Direction calculate_direction(Movables &monster, Movables &digdug, Move_result result) const;




};

#endif